void insertion_sort(int array[], int length)
{
    int j;
    for (j = 1; j < length; j++)
    {
        int i = j - 1;
        int key = *(array + j);
        while (i >= 0 && *(array + i) > key)
        {
            *(array + i + 1) = *(array + i);
            i--;
        }
        *(array + i + 1) = key;
    }
    
}
